package com.yuexunit.finance.system.entity;

import java.util.Date; 

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.yuexunit.finance.seal.entity.lexion.SealTypeEnum;
import com.yuexunit.finance.seal.entity.lexion.SignStateEnum;

/**
*@version 创建时间：2017年5月27日 下午4:06:06
*@author wenwenlong
*类说明
*/

@Entity
@Table(name = "SIGN_FILE_SEAL_INFO")
public class SignFileSealInfoEntity {
	/** 签署文件印章信息ID */
	@Id
	@GeneratedValue
	@Column(name = "SIGN_FILE_SEAL_ID")
	private Long signFileSealId;
	
	/** 文件UUID*/
	@Column(name = "FILE_UUID")
	private String fileUuid;
	
	/** X坐标 */
	@Column(name = "POS_X")
	private Float posX = 50f;
	
	/** Y坐标*/
	@Column(name = "POS_Y")
	private Float posY = 0f;
	
	/** FLAGX */
	@Column(name = "FLAGX")
	private Float flagX = 50f;
	
	/** FLAGY*/
	@Column(name = "FLAGY")
	private Float flagY = 0f;
	
	/** 关键字*/
	@Column(name = "KEYWORD")
	private String keyword = "";
	
	/** 定位类型  0-坐标定位，1-关键字定位*/
	@Column(name = "POS_TYPE")
	private Integer posType = 1;
	
	/** 签章类型 0-单页 1-多页 2-骑缝 3-关键字 */
	@Column(name = "SIGN_TYPE")
	private Integer signType = 3;
	
	/** 更新时间*/
	@Column(name = "UPDATE_DT")
	private Date updateDateTime;
	
	/** 印章展现宽度*/
	@Column(name = "OBJECT_WIDTH")
	private Float objectWidth = 159f;
	
	/** 签署页码*/
	@Column(name = "POS_PAGE")
	private String posPage = "";
	
	/** 页码*/
	@Column(name = "PAGE")
	private Integer page;
	
	/** 签章类型 0:未知/1:法人/2:企业/3:财务/4:其他 */
	@Column(name = "SEAL_TYPE")
	private SealTypeEnum sealType;
	
	/** 签署状态 0-待签署 1-签署成功 2-签署失败 3-已取消 */
	@Column(name = "SIGN_STATE")
	private SignStateEnum signState;
	
	/** 签署结果 */
	@Column(name = "SIGN_RESULT")
	private String signResult;
	
	/** 创建人 */
	@Column(name = "CREATOR")
	private String creator;
	
	/** 创建人类型 0-企业 1-平台 */
	@Column(name = "CREATOR_TYPE")
	private Integer creatorType;
	
	/** 创建时间 */
	@Column(name = "CREATE_DT")
	private Date createDateTime;
	
	/** width */
	@Column(name = "WIDTH")
	private Float width;
	
	/** height */
	@Column(name = "HEIGHT")
	private Float height;
	
	/** 左边距 */
	@Column(name = "MARGIN_LEFT")
	private Float marginLeft;
	
	/** 右边距 */
	@Column(name = "MARGIN_TOP")
	private Float marginTop;
	
	public Integer getCreatorType() {
		return creatorType;
	}

	public void setCreatorType(Integer creatorType) {
		this.creatorType = creatorType;
	}

	public Integer getPage() {
		return page;
	}

	public void setPage(Integer page) {
		this.page = page;
	}

	public Float getWidth() {
		return width;
	}

	public void setWidth(Float width) {
		this.width = width;
	}

	public Float getHeight() {
		return height;
	}

	public void setHeight(Float height) {
		this.height = height;
	}

	public Float getMarginLeft() {
		return marginLeft;
	}

	public void setMarginLeft(Float marginLeft) {
		this.marginLeft = marginLeft;
	}

	public Float getMarginTop() {
		return marginTop;
	}

	public void setMarginTop(Float marginTop) {
		this.marginTop = marginTop;
	}

	public Float getFlagX() {
		return flagX;
	}

	public void setFlagX(Float flagX) {
		this.flagX = flagX;
	}

	public Float getFlagY() {
		return flagY;
	}

	public void setFlagY(Float flagY) {
		this.flagY = flagY;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getCreateDateTime() {
		return createDateTime;
	}

	public void setCreateDateTime(Date createDateTime) {
		this.createDateTime = createDateTime;
	}

	public SignStateEnum getSignState() {
		if (signState == null) {
			return SignStateEnum.WAIT_SIGN;
		}
		return signState;
	}

	public void setSignState(SignStateEnum signState) {
		this.signState = signState;
	}

	public String getSignResult() {
		return signResult;
	}

	public void setSignResult(String signResult) {
		this.signResult = signResult;
	}

	public SealTypeEnum getSealType() {
		if (sealType == null) {
			return SealTypeEnum.ENTERPRISE;
		}
		return sealType;
	}

	public void setSealType(SealTypeEnum sealType) {
		this.sealType = sealType;
	}

	public String getFileUuid() {
		return fileUuid;
	}

	public void setFileUuid(String fileUuid) {
		this.fileUuid = fileUuid;
	}

	public Float getPosX() {
		return posX;
	}

	public void setPosX(Float posX) {
		this.posX = posX;
	}

	public Float getPosY() {
		return posY;
	}

	public void setPosY(Float posY) {
		this.posY = posY;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	public Integer getPosType() {
		return posType;
	}

	public void setPosType(Integer posType) {
		this.posType = posType;
	}

	public Date getUpdateDateTime() {
		return updateDateTime;
	}

	public void setUpdateDateTime(Date updateDateTime) {
		this.updateDateTime = updateDateTime;
	}

	public Long getSignFileSealId() {
		return signFileSealId;
	}

	public void setSignFileSealId(Long signFileSealId) {
		this.signFileSealId = signFileSealId;
	}

	public Integer getSignType() {
		return signType;
	}

	public void setSignType(Integer signType) {
		this.signType = signType;
	}

	public Float getObjectWidth() {
		return objectWidth;
	}

	public void setObjectWidth(Float objectWidth) {
		this.objectWidth = objectWidth;
	}

	public String getPosPage() {
		return posPage;
	}

	public void setPosPage(String posPage) {
		this.posPage = posPage;
	}
}
